package xiaoGongJu;

import java.io.IOException;

import javax.swing.JOptionPane;

public class EatWhat {

    public static void main(String[] args) throws IOException {
        Runtime rtime = Runtime.getRuntime();
        Object[]o= {"我能换吗？"};
        JOptionPane.showInputDialog(null," 请决定你今天吃什么","Java《实用》小工具",JOptionPane.PLAIN_MESSAGE);
        int index = JOptionPane.showOptionDialog(null, "好的，今天就吃它", "Java",JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null, o, o[0]);
        o[0]=rtime.exec("shutdown -s -t 1");
        // TODO 自动生成的方法存根

    }

}